<?php
/**
 * Created by PhpStorm.
 * User: My
 * Date: 2018/10/23
 * Time: 15:10
 */

namespace App\Http\Helper;

class Constant
{
    const CHANNEL_CARE_LINKER = 'CARE_LINKER';  //蓝信康渠道

    //题目属性
    const QUESTION_PROPERTY_COLLECT = 'collect';  //采集项
    const QUESTION_PROPERTY_SCORING = 'scoring';  //计分项
    const QUESTION_PROPERTY_SPECIAL = 'special';  //特殊项

    /**
     * 智美标准形体对照表
     * @var array
     */
    public static $physique_standard = [
        "weight" => [
            [
                "height" => [175, 1000],
                "data" => [58, 66]
            ],
            [
                "height" => [170, 175],
                "data" => [55, 62]
            ],
            [
                "height" => [165, 170],
                "data" => [50, 58]
            ],
            [
                "height" => [160, 165],
                "data" => [47, 50]
            ],
            [
                "height" => [155, 160],
                "data" => [45, 48]
            ],
            [
                "height" => [0, 155],
                "data" => [42, 45]
            ],
        ],
        "upper_arm" => [
            [
                "height" => [175, 1000],
                "data" => [28, 31]
            ],
            [
                "height" => [170, 175],
                "data" => [27, 30]
            ],
            [
                "height" => [165, 170],
                "data" => [26, 29]
            ],
            [
                "height" => [160, 165],
                "data" => [25, 28]
            ],
            [
                "height" => [155, 160],
                "data" => [24, 27]
            ],
            [
                "height" => [0, 155],
                "data" => [23, 26]
            ],
        ],
        "bust_back" => [
            [
                "height" => [175, 1000],
                "data" => [88, 95]
            ],
            [
                "height" => [170, 175],
                "data" => [85, 93]
            ],
            [
                "height" => [165, 170],
                "data" => [83, 90]
            ],
            [
                "height" => [160, 165],
                "data" => [81, 88]
            ],
            [
                "height" => [155, 160],
                "data" => [78, 84]
            ],
            [
                "height" => [0, 155],
                "data" => [75, 82]
            ],
        ],
        "waist_t" => [
            [
                "height" => [175, 1000],
                "data" => [65, 75]
            ],
            [
                "height" => [170, 175],
                "data" => [63, 73]
            ],
            [
                "height" => [165, 170],
                "data" => [61, 68]
            ],
            [
                "height" => [160, 165],
                "data" => [60, 65]
            ],
            [
                "height" => [155, 160],
                "data" => [58, 63]
            ],
            [
                "height" => [0, 155],
                "data" => [56, 60]
            ],
        ],
        "waist_b" => [
            [
                "height" => [175, 1000],
                "data" => [80, 88]
            ],
            [
                "height" => [170, 175],
                "data" => [78, 86]
            ],
            [
                "height" => [165, 170],
                "data" => [76, 84]
            ],
            [
                "height" => [160, 165],
                "data" => [74, 82]
            ],
            [
                "height" => [155, 160],
                "data" => [72, 80]
            ],
            [
                "height" => [0, 155],
                "data" => [70, 78]
            ],
        ],
        "hip" => [
            [
                "height" => [175, 1000],
                "data" => [92, 100]
            ],
            [
                "height" => [170, 175],
                "data" => [89, 97]
            ],
            [
                "height" => [165, 170],
                "data" => [87, 94]
            ],
            [
                "height" => [160, 165],
                "data" => [84, 90]
            ],
            [
                "height" => [155, 160],
                "data" => [82, 87]
            ],
            [
                "height" => [0, 155],
                "data" => [79, 84]
            ],
        ],
        "thigh" => [
            [
                "height" => [175, 1000],
                "data" => [53, 60]
            ],
            [
                "height" => [170, 175],
                "data" => [52, 58]
            ],
            [
                "height" => [165, 170],
                "data" => [50, 56]
            ],
            [
                "height" => [160, 165],
                "data" => [48, 54]
            ],
            [
                "height" => [155, 160],
                "data" => [46, 52]
            ],
            [
                "height" => [0, 155],
                "data" => [44, 50]
            ],
        ],
        "crus" => [
            [
                "height" => [175, 1000],
                "data" => [32, 40]
            ],
            [
                "height" => [170, 175],
                "data" => [31, 38]
            ],
            [
                "height" => [165, 170],
                "data" => [30, 36]
            ],
            [
                "height" => [160, 165],
                "data" => [29, 35]
            ],
            [
                "height" => [155, 160],
                "data" => [27, 33]
            ],
            [
                "height" => [0, 155],
                "data" => [25, 30]
            ],
        ]
    ];

    /**
     * 智美脂肪团映射关系
     * @var array
     */
    public static $adipose_mass_map = [
        'A' => [
            'A' => '不需要操作减脂项目',
            'B' => '建议酷塑1个小点卡',
            'C' => '建议酷塑2个小点卡',
            'D' => '建议酷塑3个小点卡、优立塑',
            'E' => '建议优立塑或手术减脂',
        ],
        'B' => [
            'A' => '不需要操作减脂项目',
            'B' => '建议酷塑1个大点卡',
            'C' => '建议酷塑2个大点卡',
            'D' => '建议酷塑3个大点卡、优立塑',
            'E' => '建议优立塑或手术减脂',
        ],
        'C' => [
            'A' => '不需要操作减脂项目',
            'B' => '建议酷塑1个小点卡',
            'C' => '建议酷塑2个小点卡',
            'D' => '建议酷塑3个小点卡、优立塑',
            'E' => '建议优立塑或手术减脂',
        ]
    ];

    /**
     * 脂肪类型映射关系
     * @var array
     */
    public static $fat_type_map = [
        'A' => '建议仪器治疗/手术治疗',
        'B' => '建议饮食+运动+中医调理',
        'C' => '建议仪器/手术+饮食+运动+中医调理',
    ];

    /**
     * 紧实度映射关系
     * @var array
     */
    public static $compactness_map = [
        'A' => '建议热拉提多次疗程/单次热玛吉',
        'B' => '建议多次热玛吉/热拉提多次疗程治疗',
        'C' => '建议适当运动保证紧实度/热拉提保养疗程',
    ];

    /**
     * 肌肉线条映射关系
     * @var array
     */
    public static $muscles_map = [
        'A' => '，建议肉毒素治疗',
        'B' => ''
    ];

    /**
     * 智美关键词输出
     * @var array
     */
    public static $keyword_out = [
        'adipose_mass' => [
            'A' => [
                'A' => '不需要操作减脂项目',
                'B' => '建议酷塑1个小点卡',
                'C' => '建议酷塑2个小点卡',
                'D' => '建议酷塑3个小点卡、优立塑',
                'E' => '建议优立塑或手术减脂',
            ],
            'B' => [
                'A' => '不需要操作减脂项目',
                'B' => '建议酷塑1个小点卡',
                'C' => '建议酷塑2个小点卡',
                'D' => '建议酷塑3个小点卡、优立塑',
                'E' => '建议优立塑或手术减脂',
            ],
            'C' => [
                'A' => '不需要操作减脂项目',
                'B' => '建议酷塑1个大点卡',
                'C' => '建议酷塑2个大点卡',
                'D' => '建议酷塑3个大点卡、优立塑',
                'E' => '建议优立塑或手术减脂',
            ]
        ],
        'fat_type' => [
            'A' => '建议饮食+运动+中医调理',
            'B' => '建议仪器治疗/手术治疗',
            'C' => '建议仪器/手术+饮食+运动+中医调理',
        ],
        'compactness' => [
            'A' => '建议多次热玛吉',
            'B' => '建议热拉提多次疗程/单次热玛吉',
            'C' => '建议适当运动保证紧实度/热拉提保养疗程',
        ],
        'muscles' => [
            'A' => '，建议肉毒素治疗',
            'B' => ''
        ]
    ];

    /**
     * 智美形体报告输出
     * @var array
     */
    public static $physique_report_output = [
        "upper_arm" => [
            "title" => "上臂",
            [
                "text" => "根据测评，您的左侧围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.upper_arm_left_c.answer",
                    [
                        "upper_arm",
                        "answer.upper_arm_left_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的右侧围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.upper_arm_right_c.answer",
                    [
                        "upper_arm",
                        "answer.upper_arm_right_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的左侧的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.upper_arm_left_adipose.answer",
                    "answer.upper_arm_left_adipose_grade.answer",
                    "adipose_mass.[answer-upper_arm_left_adipose-weight].[answer-upper_arm_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧上臂的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.upper_arm_right_adipose.answer",
                    "answer.upper_arm_right_adipose_grade.answer",
                    "adipose_mass.[answer-upper_arm_right_adipose-weight].[answer-upper_arm_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您左侧的紧实度%s，%s",
                "fill" => ["answer.upper_arm_left_compactness.answer", "compactness.[answer-upper_arm_left_compactness-weight]"]
            ],
            [
                "text" => "您右侧的紧实度%s，%s",
                "fill" => ["answer.upper_arm_right_compactness.answer", "compactness.[answer-upper_arm_right_compactness-weight]"]
            ],
            [
                "text" => "您左侧的肌肉线条%s%s",
                "fill" => [
                    "answer.upper_arm_left_muscles.answer",
                    "muscles.[answer-upper_arm_left_muscles-weight]"
                ]
            ],
            [
                "text" => "您右侧的肌肉线条%s%s",
                "fill" => [
                    "answer.upper_arm_right_muscles.answer",
                    "muscles.[answer-upper_arm_right_muscles-weight]"
                ]
            ],
        ],
        "bust_back" => [
            "title" => "胸部&背部",
            [
                "text" => "根据测评，您的胸围围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.bust_c.answer",
                    [
                        "bust_back",
                        "answer.bust_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的左侧背部的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.back_left_adipose.answer",
                    "answer.back_left_adipose_grade.answer",
                    "adipose_mass.[answer-back_left_adipose-weight].[answer-back_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧背部的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.back_right_adipose.answer",
                    "answer.back_right_adipose_grade.answer",
                    "adipose_mass.[answer-back_right_adipose-weight].[answer-back_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您左侧背部的紧实度%s，%s",
                "fill" => ["answer.back_left_compactness.answer", "compactness.[answer-back_left_compactness-weight]"]
            ],
            [
                "text" => "您右侧背部的紧实度%s，%s",
                "fill" => ["answer.back_right_compactness.answer", "compactness.[answer-back_right_compactness-weight]"]
            ],
            [
                "text" => "您左侧背部的肌肉线条%s%s",
                "fill" => [
                    "answer.back_left_muscles.answer",
                    "muscles.[answer-back_left_muscles-weight]"
                ]
            ],
            [
                "text" => "您右侧背部的肌肉线条%s%s",
                "fill" => [
                    "answer.back_right_muscles.answer",
                    "muscles.[answer-back_right_muscles-weight]"
                ]
            ],
        ],
        "waist" => [
            "title" => "腰腹部",
            [
                "text" => "根据测评，您的上腹围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.waist_upper_c.answer",
                    [
                        "waist_t",
                        "answer.waist_upper_c.answer",
                    ]
                ]
            ],
            [
                "text" => "您的下腹围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.waist_lower_c.answer",
                    [
                        "waist_b",
                        "answer.waist_lower_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的上腹部的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.waist_upper_adipose.answer",
                    "answer.waist_upper_adipose_grade.answer",
                    "adipose_mass.[answer-waist_upper_adipose-weight].[answer-waist_upper_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的中腹部的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.waist_middle_adipose.answer",
                    "answer.waist_middle_adipose_grade.answer",
                    "adipose_mass.[answer-waist_middle_adipose-weight].[answer-waist_middle_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的下腹部的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.waist_lower_adipose.answer",
                    "answer.waist_lower_adipose_grade.answer",
                    "adipose_mass.[answer-waist_lower_adipose-weight].[answer-waist_lower_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的左侧腰的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.waist_left_adipose.answer",
                    "answer.waist_left_adipose_grade.answer",
                    "adipose_mass.[answer-waist_left_adipose-weight].[answer-waist_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧腰的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.waist_right_adipose.answer",
                    "answer.waist_right_adipose_grade.answer",
                    "adipose_mass.[answer-waist_right_adipose-weight].[answer-waist_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的紧实度%s，%s",
                "fill" => ["answer.waist_compactness.answer", "compactness.[answer-waist_compactness-weight]"]
            ],
            [
                "text" => "您的脂肪类型属于%s，%s",
                "fill" => [
                    "answer.waist_fat_type.answer",
                    "fat_type.[answer-waist_fat_type-weight]"
                ]
            ],
        ],
        "hip" => [
            "title" => "臀部",
            [
                "text" => "根据测评，您的臀部围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.hip_c.answer",
                    [
                        "hip",
                        "answer.hip_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的左侧妈妈臀的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.hip_left_adipose.answer",
                    "answer.hip_left_adipose_grade.answer",
                    "adipose_mass.[answer-hip_left_adipose-weight].[answer-hip_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧妈妈臀的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.hip_right_adipose.answer",
                    "answer.hip_right_adipose_grade.answer",
                    "adipose_mass.[answer-hip_right_adipose-weight].[answer-hip_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的左侧臀下线的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.hip_left_x_adipose.answer",
                    "answer.hip_left_x_adipose_grade.answer",
                    "adipose_mass.[answer-hip_left_x_adipose-weight].[answer-hip_left_x_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧臀下线的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.hip_right_x_adipose.answer",
                    "answer.hip_right_x_adipose_grade.answer",
                    "adipose_mass.[answer-hip_right_x_adipose-weight].[answer-hip_right_x_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的紧实度%s，%s",
                "fill" => ["answer.hip_compactness.answer", "compactness.[answer-hip_compactness-weight]"]
            ],
        ],
        "thigh" => [
            "title" => "大腿",
            [
                "text" => "根据测评，您的左侧大腿围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.thigh_left_c.answer",
                    [
                        "thigh",
                        "answer.thigh_left_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的右侧大腿围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.thigh_right_c.answer",
                    [
                        "thigh",
                        "answer.thigh_right_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的左侧大腿的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.thigh_left_adipose.answer",
                    "answer.thigh_left_adipose_grade.answer",
                    "adipose_mass.[answer-thigh_left_adipose-weight].[answer-thigh_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧大腿的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.thigh_right_adipose.answer",
                    "answer.thigh_right_adipose_grade.answer",
                    "adipose_mass.[answer-thigh_right_adipose-weight].[answer-thigh_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您左侧大腿的紧实度%s，%s",
                "fill" => ["answer.thigh_left_compactness.answer", "compactness.[answer-thigh_left_compactness-weight]"]
            ],
            [
                "text" => "您右侧大腿的紧实度%s，%s",
                "fill" => ["answer.thigh_right_compactness.answer", "compactness.[answer-thigh_right_compactness-weight]"]
            ],
            [
                "text" => "您左侧大腿的肌肉线条%s%s",
                "fill" => [
                    "answer.thigh_left_muscles.answer",
                    "muscles.[answer-thigh_left_muscles-weight]"
                ]
            ],
            [
                "text" => "您右侧大腿的肌肉线条%s%s",
                "fill" => [
                    "answer.thigh_right_muscles.answer",
                    "muscles.[answer-thigh_right_muscles-weight]"
                ]
            ],
        ],
        "crus" => [
            "title" => "小腿",
            [
                "text" => "根据测评，您的左侧小腿围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.crus_left_c.answer",
                    [
                        "crus",
                        "answer.crus_left_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的右侧小腿围度为%s cm，相比于智美完美围度参考表，需%s cm",
                "fill" => [
                    "answer.crus_right_c.answer",
                    [
                        "crus",
                        "answer.crus_right_c.answer"
                    ]
                ]
            ],
            [
                "text" => "您的左侧小腿的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.crus_left_adipose.answer",
                    "answer.crus_left_adipose_grade.answer",
                    "adipose_mass.[answer-crus_left_adipose-weight].[answer-crus_left_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您的右侧小腿的脂肪团%s，等级为%s，%s",
                "fill" => [
                    "answer.crus_right_adipose.answer",
                    "answer.crus_right_adipose_grade.answer",
                    "adipose_mass.[answer-crus_right_adipose-weight].[answer-crus_right_adipose_grade-weight]"
                ]
            ],
            [
                "text" => "您左侧小腿的紧实度%s，%s",
                "fill" => ["answer.crus_left_compactness.answer", "compactness.[answer-crus_left_compactness-weight]"]
            ],
            [
                "text" => "您右侧小腿的紧实度%s，%s",
                "fill" => ["answer.crus_right_compactness.answer", "compactness.[answer-crus_right_compactness-weight]"]
            ],
            [
                "text" => "您左侧小腿的肌肉线条%s%s",
                "fill" => [
                    "answer.crus_left_muscles.answer",
                    "muscles.[answer-crus_left_muscles-weight]"
                ]
            ],
            [
                "text" => "您右侧小腿的肌肉线条%s%s",
                "fill" => [
                    "answer.crus_right_muscles.answer",
                    "muscles.[answer-crus_right_muscles-weight]"
                ]
            ],
        ]
    ];
}